import http from "../utils/request";
/**
 * @description 用户登录
 * @param {*} code 临时登录凭证
 * @returns Promise
 */
export const reqLogin = (code) => http.get(`/weixin/wxLogin/${code}`)

/**
 * @description 获取用户信息
 * @returns Promise
 */
export const reqUserInfo = () => http.get('/weixin/getuserInfo')

/**
 * @description 上传资源
 * @param {*} filePath 资源路径
 * @param {*} name key
 * @returns Promise
 */
export const reqUploadFile = (filePath, name) => http.upload('/fileUpload', filePath, name)

/**
 * @description 更新用户信息
 * @param {*} userInfo 更新的用户信息
 * @returns Promise
 */
export const reqUpdateUserInfo = (userInfo) => http.post('/weixin/updateUser', userInfo)